export default {
  data () {
    return {
      form: this.$form.createForm(this),
    }
  },

  methods: {
    handleSearch () {
      const fields = this.form.getFieldsValue()

      this.$emit('search', fields)
    },

    handleReset () {
      this.form.resetFields()

      this.handleSearch()

      this.$emit('reset')
    },
  },
}
